package com.sleepcamel.rest.domain.util;

public class MiscUtils {

	public static String packageToFilePath(String packageName){
		if ( packageName == null )
			return packageName;
		return packageName.replaceAll("\\.", "/");
	}

	public static String getValidName(String name, boolean isMethod) {
		if ( name == null )
			return "";
		
		String newName = name.replaceAll("\\s+", "");
		if ( isMethod ){
			newName = newName.substring(0,1).toLowerCase() + newName.substring(1);
		}
		return newName;
	}
	
}
